<?php
require(dirname(__FILE__)."/includes/init.php");
if(isset($_SESSION['user_name'])){
if(isset($_REQUEST['Submit'])){
	$emailAddress = $_REQUEST['emailAddress'];
	$emailTitle = $_REQUEST['emailTitle'];
	$emailId = $_REQUEST['emailId'];
	$server = $_REQUEST['server'];
	$emailContent = $_REQUEST['emailContent'];
	$content = formatContent($unsubUrlArr, $userActionArr, $emailContent, $emailAddress, $emailId, "999", '','');
	$content = stripslashes($content);
	send_simple_message($emailAddress, $emailTitle, $content, $emailId, $serverArr[$server]);
}
?>
<title>测试邮件</title>
<form action="sendTestMail.php" method="post" name="sendTestMail">
<table width="850" border="0" bgcolor="#0066FF">
  <tr bgcolor="#FFFFFF">
    <td colspan="2"><div align="center">发送测试邮件</div></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="81">邮件地址:</td>
    <td width="509"><input name="emailAddress" type="text" id="emailAddress" style="height:30px;" size="50" maxlength="50" /></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>邮件TITLE:</td>
    <td><input name="emailTitle" type="text" id="emailTitle" style="height:30px;" size="50" maxlength="50" /></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>邮件ID:</td>
    <td><input name="emailId" type="text" id="emailId" style="height:30px;" size="50" maxlength="50" /></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>服务器:</td>
    <td><input name="server" type="text" id="server" style="height:30px;" size="50" maxlength="50" /></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>正文:</td>
    <td><textarea name="emailContent" cols="100" rows="30"></textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td><input type="submit" name="Submit" value="发送" />
      |*UPDATE*| |*TRACK*| |*UPDATE*|</td>
  </tr>
</table>
</form>
<?php
}else{
 echo "hello";
}
?>